﻿Module mdl_MoveInLineService

#Region "MoveInService_Check"
    Public Function MoveInServiceLine_Check(ByVal inParam As InSiteWebService.InMoveInLine) As InSiteWebService.OutMoveInLine

        Dim srvClient As New InSiteWebService.InSiteServiceSoapClient   'サービスクライアント
        Dim outParam As New InSiteWebService.OutMoveInLine              '全サービス共通の出力用ヘッダ

        inParam.Header = New InSiteWebService.InHeader                  '全サービス共通の入力用ヘッダ
        inParam.Header.User = INSITE_USER                               'ログインユーザ
        inParam.Header.Password = PASSWORD                              'ログインパスワード

        Try
            outParam = srvClient.MoveInLineService_Check(inParam)       'ロット着工チェック
            Return outParam

        Catch ex As Exception
            outParam.Header = New InSiteWebService.OutHeader
            outParam.Header.Status = STS_ERROR
            outParam.Header.ResultMessage = New String() {ex.Message & " (" & ex.InnerException.Message & ")"}
            outParam.Header.ResultCode = New String() {"99999"}
            Return outParam

        Finally
            srvClient = Nothing
            outParam = Nothing

        End Try

    End Function
#End Region

#Region "MoveInServiceLine_Execute"
    Public Function MoveInServiceLine_Execute(ByVal inParam As InSiteWebService.InMoveInLine, ByVal clientStr As String) As InSiteWebService.OutMoveInLine

        Dim srvClient As New InSiteWebService.InSiteServiceSoapClient   'サービスクライアント
        Dim outParam As New InSiteWebService.OutMoveInLine              '全サービス共通の出力用ヘッダ

        inParam.Header = New InSiteWebService.InHeader                  '全サービス共通の入力用ヘッダ
        inParam.Header.User = INSITE_USER                               'ログインユーザ
        inParam.Header.Password = PASSWORD                              'ログインパスワード
        inParam.Header.Client = clientStr

        Try
            outParam = srvClient.MoveInLineService_Execute(inParam)     'ロット着工

            Return outParam

        Catch ex As Exception
            outParam.Header = New InSiteWebService.OutHeader
            outParam.Header.Status = STS_ERROR
            outParam.Header.ResultMessage = New String() {ex.Message & " (" & ex.InnerException.Message & ")"}
            outParam.Header.ResultCode = New String() {"99999"}
            Return outParam

        Finally
            srvClient = Nothing
            outParam = Nothing

        End Try

    End Function
#End Region

End Module
